<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Indexing API</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Indexing API' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../intern.html">Inter Modules</a></li><li><a href="index.html">index</a></li><li><a href="index.html#1">Chapter 1: Starting Up</a></li><li><b>Indexing API</b></li></ul></div>
<p class="purpose">How the parent tool can ask for an Inter tree to be indexed.</p>

<ul class="toc"><li><a href="1-ia.html#SP1">&#167;1. Public API</a></li><li><a href="1-ia.html#SP8">&#167;8. Sessions</a></li><li><a href="1-ia.html#SP10">&#167;10. Private API</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. Public API.</b>This is a large and complex module of code, but it really only does one thing,
and so it is simple to control. Other modules or tools should do this only by
calling the functions below.
</p>

<p class="commentary">To produce one or more index products (see below), first open a session; then
set its localisation &mdash; essentially, choose what language it should be written
in; then call functions to make the actual products; and finally close the session.
Note that:
</p>

<ul class="items"><li>(1) If you want to index the same tree of code to two different languages, you
will need to do this as two sessions. However, an Index website and an EPS map
which are in the same language can both be made in the same session, and this
is more efficient than using two.
</li><li>(2) The <a href="index.html" class="internal">index</a> module probably works fine if multiple sessions are open at
once (and indeed is probably threadsafe), but it hasn't been tested for that
or written with that in mind: a safer way to make multiple indexes simultaneously
is probably to run multiple independent <span class="extract"><span class="extract-syntax">inter</span></span> processes, each making one index.
</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>So, then, opening:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::open_session</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">Indexing::open_session</span></span>:<br/>Index Stage - <a href="1-is.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_tree</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="1-ia.html#SP9" class="function-link"><span class="function-syntax">Indexing::new_session</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>Now localising. You can either set an existing dictionary which you happen
to have to hand, or else ask to read definitions from a file. See <a href="../html-module/2-lcl.html" class="internal">Localisation (in html)</a>
for how all of this works.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::set_localisation_dictionary</span><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">, </span><span class="identifier-syntax">localisation_dictionary</span><span class="plain-syntax"> *</span><span class="identifier-syntax">LD</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">localisation</span><span class="plain-syntax"> = </span><span class="identifier-syntax">LD</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::localise</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">Indexing::localise</span></span>:<br/>Index Stage - <a href="1-is.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">, </span><span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="identifier-syntax">F</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Localisation::stock_from_file</span><span class="plain-syntax">(</span><span class="identifier-syntax">F</span><span class="plain-syntax">, </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">localisation</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>Now for the productive part. You can make an entire index mini-website with
the following function, which may generate several hundred HTML files. This is
what is used in the Inform GUI apps on every compilation.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::generate_index_website</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">Indexing::generate_index_website</span></span>:<br/>Index Stage - <a href="1-is.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">structure</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="2-ii.html#SP1" class="function-link"><span class="function-syntax">InterpretIndex::generate</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">structure</span><span class="plain-syntax">, </span><span class="identifier-syntax">session</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>This is a one-off function for generating the content of an index element
(without its heading, or any HTML surround): it's used for unit-testing those
elements, but is never used by the Inform GUI app.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::generate_one_element</span><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">elt</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="3-tpt.html#SP3" class="function-link"><span class="function-syntax">Elements::test_card</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">elt</span><span class="plain-syntax">, </span><span class="identifier-syntax">session</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>This is used by the Inform GUI apps to "release along with an EPS file".
Essentially it makes a print-suitable version of the Map element of the index,
though there are also many bells and whistles for customising the appearance
of this. This is written to the stream <span class="extract"><span class="extract-syntax">F_alt</span></span> if that is non-null, and otherwise
into a text file at <span class="extract"><span class="extract-syntax">F</span></span> (which is created in the process).
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::generate_EPS_map</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">Indexing::generate_EPS_map</span></span>:<br/>Index Stage - <a href="1-is.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">, </span><span class="identifier-syntax">filename</span><span class="plain-syntax"> *</span><span class="identifier-syntax">F</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">F_alt</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="4-rem.html#SP1" class="function-link"><span class="function-syntax">RenderEPSMap::render_map_as_EPS</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">F</span><span class="plain-syntax">, </span><span class="identifier-syntax">F_alt</span><span class="plain-syntax">, </span><span class="identifier-syntax">session</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>And lastly closing. The only thing this now does is to enable a new session
to be opened afterwards, in fact, but that might change in future.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::close_session</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">Indexing::close_session</span></span>:<br/>Index Stage - <a href="1-is.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">session_closed</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3_1" class="paragraph-anchor"></a><b>&#167;3.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Check this is an open session</span><span class="named-paragraph-number">3.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">session</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"no indexing session"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">session_closed</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"closed indexing session"</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="1-ia.html#SP3">&#167;3</a> (twice), <a href="1-ia.html#SP4">&#167;4</a>, <a href="1-ia.html#SP5">&#167;5</a>, <a href="1-ia.html#SP6">&#167;6</a>, <a href="1-ia.html#SP7">&#167;7</a>, <a href="1-ia.html#SP10">&#167;10</a> (three times), <a href="1-ia.html#SP11">&#167;11</a> (8 times) and <a href="1-ia.html#SP12">&#167;12</a> (three times).</li></ul>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. Sessions.</b>This is a miscellany, plain and simple, but it contains all of the workspace
and caches needed to index an Inter tree.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">inter_tree</span><span class="plain-syntax"> *</span><span class="identifier-syntax">tree</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">tree_inventory</span><span class="plain-syntax"> *</span><span class="identifier-syntax">inv</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">inter_lexicon</span><span class="plain-syntax"> *</span><span class="identifier-syntax">lexicon</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">faux_instance_set</span><span class="plain-syntax"> *</span><span class="identifier-syntax">set_of_instances</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="identifier-syntax">list_of_scenes</span><span class="plain-syntax">; </span><span class="comment-syntax"> of </span><span class="extract"><span class="extract-syntax">simplified_scene</span></span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">localisation_dictionary</span><span class="plain-syntax"> *</span><span class="identifier-syntax">localisation</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="identifier-syntax">list_of_EPS_map_levels</span><span class="plain-syntax">; </span><span class="comment-syntax"> of </span><span class="extract"><span class="extract-syntax">EPS_map_level</span></span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="identifier-syntax">list_of_submaps</span><span class="plain-syntax">; </span><span class="comment-syntax"> of </span><span class="extract"><span class="extract-syntax">connected_submap</span></span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="identifier-syntax">list_of_pages</span><span class="plain-syntax">; </span><span class="comment-syntax"> of </span><span class="extract"><span class="extract-syntax">index_page</span></span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">map_parameter_scope</span><span class="plain-syntax"> </span><span class="identifier-syntax">global_map_scope</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">changed_global_room_colour</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">index_page_data</span><span class="plain-syntax"> </span><span class="identifier-syntax">page</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">map_calculation_data</span><span class="plain-syntax"> </span><span class="identifier-syntax">calc</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">story_dir_to_page_dir</span><span class="plain-syntax">[</span><span class="constant-syntax">MAX_DIRECTIONS</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">session_closed</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CLASS_DEFINITION</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">index_session</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>The structure index_session is accessed in 1/is, 2/iu, 2/fi, 2/fs, 4/mc, 4/sm, 4/rhm, 4/rem and here.</li></ul>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::new_session</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">Indexing::new_session</span></span>:<br/><a href="1-ia.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_tree</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">I</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"no tree to index"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CREATE</span><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">tree</span><span class="plain-syntax"> = </span><span class="identifier-syntax">I</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">inv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">MakeSynopticModuleStage::take_inventory</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lexicon</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">set_of_instances</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_scenes</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_EPS_map_levels</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NEW_LINKED_LIST</span><span class="plain-syntax">(</span><span class="reserved-syntax">EPS_map_level</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_submaps</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NEW_LINKED_LIST</span><span class="plain-syntax">(</span><span class="reserved-syntax">connected_submap</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_pages</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NEW_LINKED_LIST</span><span class="plain-syntax">(</span><span class="reserved-syntax">index_page</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">localisation</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Localisation::new</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">global_map_scope</span><span class="plain-syntax"> = </span><a href="4-mc.html#SP3" class="function-link"><span class="function-syntax">ConfigureIndexMap::global_settings</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">changed_global_room_colour</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">calc</span><span class="plain-syntax"> = </span><a href="4-sm.html#SP7" class="function-link"><span class="function-syntax">SpatialMap::fresh_data</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">session_closed</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="constant-syntax">MAX_DIRECTIONS</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">story_dir_to_page_dir</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] = </span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. Private API.</b>The remaining functions in this section are for use only within the <a href="index.html" class="internal">index</a>
module.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">inter_tree</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_tree</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_tree</span></span>:<br/>Faux Instances - <a href="2-fi.html#SP10">&#167;10</a><br/>Faux Scenes - <a href="2-fs.html#SP2">&#167;2</a><br/>Behaviour Element - <a href="3-be.html#SP1">&#167;1</a><br/>Card Element - <a href="3-ce.html#SP1">&#167;1</a><br/>Commands Element - <a href="3-ce3.html#SP1">&#167;1</a><br/>Contents Element - <a href="3-ce4.html#SP1">&#167;1</a><br/>Extras Element - <a href="3-ee2.html#SP1">&#167;1</a><br/>Figures Element - <a href="3-fe.html#SP1">&#167;1</a><br/>Grouped Element - <a href="3-ge2.html#SP2">&#167;2</a><br/>Innards Element - <a href="3-ie.html#SP1">&#167;1</a><br/>Phrasebook Element - <a href="3-pe.html#SP1">&#167;1</a><br/>Plot Element - <a href="3-pe2.html#SP1">&#167;1</a><br/>Tokens Element - <a href="3-te2.html#SP1">&#167;1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">tree</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="identifier-syntax">localisation_dictionary</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_localisation</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_localisation</span></span>:<br/>Index Interpreter - <a href="2-ii.html#SP1">&#167;1</a>, <a href="2-ii.html#SP2">&#167;2</a><br/>Index Rules - <a href="2-ir.html#SP8">&#167;8</a>, <a href="2-ir.html#SP11">&#167;11</a>, <a href="2-ir.html#SP12">&#167;12</a>, <a href="2-ir.html#SP15">&#167;15</a><br/>The Periodic Table - <a href="3-tpt.html#SP2">&#167;2</a><br/>Alphabetic Element - <a href="3-ae.html#SP1">&#167;1</a><br/>Arithmetic Element - <a href="3-ae2.html#SP1">&#167;1</a><br/>Behaviour Element - <a href="3-be.html#SP1">&#167;1</a><br/>Chart Element - <a href="3-ce2.html#SP1">&#167;1</a>, <a href="3-ce2.html#SP6">&#167;6</a><br/>Commands Element - <a href="3-ce3.html#SP1">&#167;1</a><br/>Contents Element - <a href="3-ce4.html#SP1">&#167;1</a><br/>Events Element - <a href="3-ee.html#SP1">&#167;1</a><br/>Extras Element - <a href="3-ee2.html#SP1">&#167;1</a><br/>Figures Element - <a href="3-fe.html#SP1">&#167;1</a><br/>Gazetteer Element - <a href="3-ge.html#SP1">&#167;1</a><br/>Grouped Element - <a href="3-ge2.html#SP2">&#167;2</a><br/>Innards Element - <a href="3-ie.html#SP1">&#167;1</a><br/>Lexicon Element - <a href="3-le.html#SP1">&#167;1</a><br/>Map Element - <a href="3-me.html#SP1">&#167;1</a>, <a href="3-me.html#SP2">&#167;2</a>, <a href="3-me.html#SP3">&#167;3</a>, <a href="3-me.html#SP4">&#167;4</a>, <a href="3-me.html#SP7">&#167;7</a><br/>Plot Element - <a href="3-pe2.html#SP1">&#167;1</a><br/>Relations Element - <a href="3-re.html#SP1">&#167;1</a><br/>Rules for Scenes Element - <a href="3-rfse.html#SP1">&#167;1</a><br/>Standards Element - <a href="3-se.html#SP1">&#167;1</a><br/>Tables Element - <a href="3-te.html#SP1">&#167;1</a><br/>Tokens Element - <a href="3-te2.html#SP1">&#167;1</a><br/>Values Element - <a href="3-ve.html#SP1">&#167;1</a><br/>Verbs Element - <a href="3-ve2.html#SP1">&#167;1</a><br/>Render HTML Map - <a href="4-rhm.html#SP11">&#167;11</a>, <a href="4-rhm.html#SP12">&#167;12</a>, <a href="4-rhm.html#SP16">&#167;16</a><br/>Render EPS Map - <a href="4-rem.html#SP1">&#167;1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">localisation</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="identifier-syntax">tree_inventory</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_inventory</span><button class="popup" onclick="togglePopup('usagePopup9')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup9">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_inventory</span></span>:<br/>Faux Instances - <a href="2-fi.html#SP8">&#167;8</a><br/>Faux Scenes - <a href="2-fs.html#SP2">&#167;2</a><br/>Alphabetic Element - <a href="3-ae.html#SP1">&#167;1</a><br/>Arithmetic Element - <a href="3-ae2.html#SP1">&#167;1</a><br/>Behaviour Element - <a href="3-be.html#SP1">&#167;1</a><br/>Chart Element - <a href="3-ce2.html#SP1">&#167;1</a><br/>Contents Element - <a href="3-ce4.html#SP1">&#167;1</a><br/>Events Element - <a href="3-ee.html#SP1">&#167;1</a><br/>Extras Element - <a href="3-ee2.html#SP1">&#167;1</a><br/>Figures Element - <a href="3-fe.html#SP1">&#167;1</a><br/>Grouped Element - <a href="3-ge2.html#SP1">&#167;1</a>, <a href="3-ge2.html#SP2">&#167;2</a><br/>Innards Element - <a href="3-ie.html#SP1">&#167;1</a><br/>Plot Element - <a href="3-pe2.html#SP1">&#167;1</a><br/>Relations Element - <a href="3-re.html#SP1">&#167;1</a><br/>Rules for Scenes Element - <a href="3-rfse.html#SP1">&#167;1</a><br/>Standards Element - <a href="3-se.html#SP1">&#167;1</a><br/>Tables Element - <a href="3-te.html#SP1">&#167;1</a><br/>Values Element - <a href="3-ve.html#SP1">&#167;1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">inv</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">map_parameter_scope</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_global_map_scope</span><button class="popup" onclick="togglePopup('usagePopup10')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup10">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_global_map_scope</span></span>:<br/>Map Configuration - <a href="4-mc.html#SP4">&#167;4</a>, <a href="4-mc.html#SP5">&#167;5</a>, <a href="4-mc.html#SP6">&#167;6</a>, <a href="4-mc.html#SP7">&#167;7</a>, <a href="4-mc.html#SP8">&#167;8</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> &amp;(</span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">global_map_scope</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11" class="paragraph-anchor"></a><b>&#167;11. </b>These build up gradually:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_list_of_EPS_map_levels</span><button class="popup" onclick="togglePopup('usagePopup11')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup11">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_list_of_EPS_map_levels</span></span>:<br/>Faux Instances - <a href="2-fi.html#SP10_4">&#167;10.4</a><br/>Render EPS Map - <a href="4-rem.html#SP1_2_1">&#167;1.2.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_EPS_map_levels</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::add_EPS_map_levels</span><button class="popup" onclick="togglePopup('usagePopup12')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup12">Usage of <span class="code-font"><span class="function-syntax">Indexing::add_EPS_map_levels</span></span>:<br/>Render EPS Map - <a href="4-rem.html#SP1_1_1">&#167;1.1.1</a>, <a href="4-rem.html#SP1_1_2">&#167;1.1.2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">, </span><span class="reserved-syntax">EPS_map_level</span><span class="plain-syntax"> *</span><span class="identifier-syntax">eml</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">ADD_TO_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">eml</span><span class="plain-syntax">, </span><span class="reserved-syntax">EPS_map_level</span><span class="plain-syntax">, </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_EPS_map_levels</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_list_of_submaps</span><button class="popup" onclick="togglePopup('usagePopup13')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup13">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_list_of_submaps</span></span>:<br/>Spatial Map - <a href="4-sm.html#SP8_3">&#167;8.3</a>, <a href="4-sm.html#SP8_4">&#167;8.4</a>, <a href="4-sm.html#SP8_4_1_2">&#167;8.4.1.2</a>, <a href="4-sm.html#SP8_4_2">&#167;8.4.2</a>, <a href="4-sm.html#SP66">&#167;66</a>, <a href="4-sm.html#SP71">&#167;71</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_submaps</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::add_submap</span><button class="popup" onclick="togglePopup('usagePopup14')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup14">Usage of <span class="code-font"><span class="function-syntax">Indexing::add_submap</span></span>:<br/>Spatial Map - <a href="4-sm.html#SP25">&#167;25</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">, </span><span class="reserved-syntax">connected_submap</span><span class="plain-syntax"> *</span><span class="identifier-syntax">sub</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">ADD_TO_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">sub</span><span class="plain-syntax">, </span><span class="reserved-syntax">connected_submap</span><span class="plain-syntax">, </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_submaps</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::empty_list_of_pages</span><button class="popup" onclick="togglePopup('usagePopup15')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup15">Usage of <span class="code-font"><span class="function-syntax">Indexing::empty_list_of_pages</span></span>:<br/>Index Interpreter - <a href="2-ii.html#SP1">&#167;1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LinkedLists::empty</span><span class="plain-syntax">(</span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_pages</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_list_of_pages</span><button class="popup" onclick="togglePopup('usagePopup16')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup16">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_list_of_pages</span></span>:<br/>Index Interpreter - <a href="2-ii.html#SP1_2">&#167;1.2</a><br/>Styles and Scripts - <a href="2-sas.html#SP1_1">&#167;1.1</a><br/>The Periodic Table - <a href="3-tpt.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_pages</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexing::add_page</span><button class="popup" onclick="togglePopup('usagePopup17')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup17">Usage of <span class="code-font"><span class="function-syntax">Indexing::add_page</span></span>:<br/>Index Interpreter - <a href="2-ii.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">, </span><span class="reserved-syntax">index_page</span><span class="plain-syntax"> *</span><span class="identifier-syntax">page</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">ADD_TO_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">page</span><span class="plain-syntax">, </span><span class="reserved-syntax">index_page</span><span class="plain-syntax">, </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_pages</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">index_page</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::latest_page</span><button class="popup" onclick="togglePopup('usagePopup18')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup18">Usage of <span class="code-font"><span class="function-syntax">Indexing::latest_page</span></span>:<br/>Index Interpreter - <a href="2-ii.html#SP2_2">&#167;2.2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">LinkedLists::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_pages</span><span class="plain-syntax">) == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">LAST_IN_LINKED_LIST</span><span class="plain-syntax">(</span><span class="reserved-syntax">index_page</span><span class="plain-syntax">, </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_pages</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP12" class="paragraph-anchor"></a><b>&#167;12. </b>These more substantial resources are calculated all in one go, but only on demand:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_lexicon</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_lexicon</span><button class="popup" onclick="togglePopup('usagePopup19')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup19">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_lexicon</span></span>:<br/>Gazetteer Element - <a href="3-ge.html#SP1">&#167;1</a><br/>Lexicon Element - <a href="3-le.html#SP1">&#167;1</a><br/>Verbs Element - <a href="3-ve2.html#SP1">&#167;1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lexicon</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lexicon</span><span class="plain-syntax"> = </span><a href="2-lxc.html#SP3" class="function-link"><span class="function-syntax">IndexLexicon::stock</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">tree</span><span class="plain-syntax">, </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">inv</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lexicon</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">faux_instance_set</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_set_of_instances</span><button class="popup" onclick="togglePopup('usagePopup20')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup20">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_set_of_instances</span></span>:<br/>Faux Instances - <a href="2-fi.html#SP10">&#167;10</a>, <a href="2-fi.html#SP11">&#167;11</a>, <a href="2-fi.html#SP12">&#167;12</a><br/>Map Element - <a href="3-me.html#SP1">&#167;1</a>, <a href="3-me.html#SP6">&#167;6</a>, <a href="3-me.html#SP7">&#167;7</a><br/>Spatial Map - <a href="4-sm.html#SP8">&#167;8</a>, <a href="4-sm.html#SP11">&#167;11</a>, <a href="4-sm.html#SP35">&#167;35</a>, <a href="4-sm.html#SP36">&#167;36</a>, <a href="4-sm.html#SP68">&#167;68</a>, <a href="4-sm.html#SP70">&#167;70</a><br/>Render HTML Map - <a href="4-rhm.html#SP1">&#167;1</a>, <a href="4-rhm.html#SP10">&#167;10</a>, <a href="4-rhm.html#SP11">&#167;11</a>, <a href="4-rhm.html#SP16">&#167;16</a>, <a href="4-rhm.html#SP19">&#167;19</a><br/>Render EPS Map - <a href="4-rem.html#SP1_1">&#167;1.1</a>, <a href="4-rem.html#SP1_2">&#167;1.2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">set_of_instances</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><a href="2-fi.html#SP8" class="function-link"><span class="function-syntax">FauxInstances::make_faux</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">session</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">set_of_instances</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="function-syntax">Indexing::get_list_of_scenes</span><button class="popup" onclick="togglePopup('usagePopup21')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup21">Usage of <span class="code-font"><span class="function-syntax">Indexing::get_list_of_scenes</span></span>:<br/>Faux Scenes - <a href="2-fs.html#SP7">&#167;7</a><br/>Plot Element - <a href="3-pe2.html#SP1">&#167;1</a>, <a href="3-pe2.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="1-ia.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Check this is an open session</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_scenes</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><a href="2-fs.html#SP2" class="function-link"><span class="function-syntax">FauxScenes::list_of_faux_scenes</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">session</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">session</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_scenes</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="1-is.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresscurrentchapter">1</li><li class="progresssection"><a href="1-im.html">im</a></li><li class="progresssection"><a href="1-is.html">is</a></li><li class="progresscurrent">ia</li><li class="progresschapter"><a href="2-il.html">2</a></li><li class="progresschapter"><a href="3-tpt.html">3</a></li><li class="progresschapter"><a href="4-mc.html">4</a></li><li class="progressnext"><a href="2-il.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

